package com.dongdongshop.controller;

import com.dongdongshop.common.Result;
import com.dongdongshop.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("sms")
public class SmsController {

    @Autowired
    private SmsService smsService;

    @PostMapping("sendPhoneMessage")
    public Result sendPhoneMessage(String phoneNum){
        smsService.sendPhoneMessage(phoneNum);
        return Result.OK();
    }
}
